package start.spring.basic.job.entity;

import java.io.Serializable;
import java.util.Date;

import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import start.spring.basic.ry.annotation.Excel;


/**
 * 定时任务对象 gg_pz_job
 * 
 * @author xyy
 * @date 2023-06-26
 */
@Data
@TableName("gg_pz_job")
@ApiModel(value="gg_pz_job表映射对象", description="")
public class GgPzJob implements Serializable {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty(value = "任务类名")
    @TableField("jobclass")
    private String jobclass;

    @ApiModelProperty(value = "触发器名称")
    @TableField("triggername")
    private String triggername;

    @ApiModelProperty(value = "触发器分组")
    @TableField("triggergroup")
    private String triggergroup;

    @ApiModelProperty(value = "任务名称")
    @TableField("jobname")
    @Excel(name = "任务名称")
    private String jobname;

    @ApiModelProperty(value = "调度策略")
    @TableField("crontime")
    @Excel(name = "调度策略")
    private String crontime;

    @ApiModelProperty(value = "任务描述")
    @TableField("description")
    @Excel(name = "任务描述")
    private String description;

    @ApiModelProperty(value = "线程数量")
    @TableField("threadnum")
    @Excel(name = "线程数量")
    private Long threadnum;

    @ApiModelProperty(value = "超时时间")
    @TableField("timeout")
    @Excel(name = "超时时间")
    private Long timeout;

    @ApiModelProperty(value = "执行状态")
    @TableField("status")
    @Excel(name = "执行状态", readConverterExp = "0=等待执行,1=正在执行,2=执行完成,3=执行出错")
    private String status;

    @ApiModelProperty(value = "开始时间")
    @TableField("kssj")
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "开始时间", width = 30, dateFormat = "yyyy-MM-dd")
    private Date kssj;

    @ApiModelProperty(value = "开始时间起")
    @TableField(exist=false)
    private String beginKssj;
    
    @ApiModelProperty(value = "开始时间止")
    @TableField(exist=false)
    private String endKssj;

    @ApiModelProperty(value = "结束时间")
    @TableField("jssj")
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "结束时间", width = 30, dateFormat = "yyyy-MM-dd")
    private Date jssj;

    @ApiModelProperty(value = "错误信息")
    @TableField("cwxx")
    private String cwxx;

    @ApiModelProperty(value = "任务是否有效（Y有效，N无效）")
    @TableField("yxbz")
    @Excel(name = "是否有效", readConverterExp = "Y=有效,N=无效")
    private String yxbz;
    
    @ApiModelProperty(value = "是否可并发（Y可并发，N不可并发）")
    @TableField("sfbf")
    @Excel(name = "是否可并发", readConverterExp = "Y=可并发,N=不可并发")
    private String sfbf;
    
    @ApiModelProperty(value = "任务序号")
    @TableField("rwxh")
    private Long rwxh;
	
    @Override
    public String toString() {
        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
            .append("jobclass", getJobclass())
            .append("triggername", getTriggername())
            .append("triggergroup", getTriggergroup())
            .append("jobname", getJobname())
            .append("crontime", getCrontime())
            .append("description", getDescription())
            .append("threadnum", getThreadnum())
            .append("timeout", getTimeout())
            .append("status", getStatus())
            .append("kssj", getKssj())
            .append("jssj", getJssj())
            .append("cwxx", getCwxx())
            .append("yxbz", getYxbz())
            .append("sfbf", getSfbf())
            .append("rwxh", getRwxh())
            .toString();
    }
}
